package ltd.newbee.mall.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import ltd.newbee.mall.api.admin.param.QueryAdminParam;
import ltd.newbee.mall.api.admin.param.QueryAdminPermParam;
import ltd.newbee.mall.api.admin.vo.AdminPermVo;
import ltd.newbee.mall.dao.AdminPermMapper;
import ltd.newbee.mall.entity.AdminPerm;
import ltd.newbee.mall.service.AdminPermService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminPermServiceImpl extends ServiceImpl<AdminPermMapper, AdminPerm> implements AdminPermService {

    /***
     * 根据token查询用户权限
     * @param token
     * @return
     */
    @Override
    public List<AdminPerm> selectAdminUserPermByToken(String token) {
        return baseMapper.selectAdminUserPermByToken(token);
    }


    @Override
    public List<AdminPermVo> selectPageByCondition(Page<AdminPermVo> page, QueryAdminPermParam query) {
        return baseMapper.selectPageByCondition(page, query);
    }
}
